#ifndef DASHBOARDUI_ADDRECORD_H
#define DASHBOARDUI_ADDRECORD_H

#include "FieldValidator.h"

#include <QWidget>

namespace Ui {
class DashboardUI_AddRecord;
}

class DashboardUI_AddRecord : public QWidget
{
    Q_OBJECT
    
public:
    explicit DashboardUI_AddRecord(QWidget *parent = 0);
    ~DashboardUI_AddRecord();

public slots:
    void reload();
    void loadCurrentRecord(int);

signals:
    void recordsChanged();
    
private slots:
    void on_submitButton_clicked();

private:
    void addRecord(int patientId, bool patientComment);
    void addComment();

    void loadRecords();

    void clearFields();
    void setCommentOnly();

    Ui::DashboardUI_AddRecord *ui;
    FieldValidator validator;
};

#endif // DASHBOARDUI_ADDRECORD_H
